<?php
    /**
    * @desc 产生一个日的下拉菜单
    */
    function return_select_30day($name = '',$selected = 1,$class = ''){
        $ret = '<select name="'.$name.'" class="'.$class.'">';
        for($day = 1;$day <=31;$day ++){
            $s = '';
            if($day == $selected){
                $s ='selected="selected"';
            }
            $ret .="<option ".$s." value=".$day.">".$day."日</option>";
        }
        $ret .='</select>';
        return $ret;
    }
    /**
    * @desc  产生一个选择月份的下拉菜单
    */

    function return_select_12month($name = '',$selected = 1,$class =''){
        $ret = '<select name="'.$name.'" class="'.$class.'">';
        for($day = 1;$day <=12;$day ++){
            $s = '';
            if($day == $selected){
                $s ='selected="selected"';
            }
            $ret .="<option ".$s." value=".$day.">".$day."月</option>";
        }
        $ret .='</select>';
        return $ret;
    }

    /**
    * 产生一个选择年份的下拉菜单
    * 
    * @param mixed $name
    * @param mixed $selected
    */
    function return_select_years($name = '',$selected = 1,$class =''){
        $ret = '<select name="'.$name.'" class="'.$class.'">';
        for($day = 1980;$day <=2005;$day ++){
            $s = '';
            if($day == $selected){
                $s ='selected="selected"';
            }            
            $ret .="<option ".$s." value=".$day.">".$day."年</option>";
        }
        $ret .='</select>';
        return $ret;
    }
?>
